home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
mcga#01.zip
/
TEST01.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1992-06-11
|
979b
|
64 lines
Program MCGATest;
uses
Crt,Dos,MCGA01;
var
Stop,
Start : LongInt;
Regs : Registers;
Function Tick : LongInt;
begin
Regs.ah := 0;
Intr ($1A,regs);
Tick := Regs.cx shl 16 + Regs.dx;
end;
Procedure Pause;
begin
Repeat Until Keypressed;
While Keypressed do While Readkey = #0 do;
end;
Procedure ShowAndTell;
begin
Pause;
TextMode (3);
Write ('Routine took ',(Stop-Start),' ticks or ');
WriteLn ((Stop-Start)/18.2:4:3,' seconds!');
Pause;
end;
Procedure Control;
var
I,J : Integer;
begin
SetGraphMode ($13);
Start := Tick;
For I := 0 to 199 do
For J := 0 to 320 do
SetPixelPas (J,I,Random(256));
Stop := Tick;
ShowAndTell;
SetGraphMode ($13);
Start := Tick;
For I := 0 to 199 do
For J := 0 to 320 do
SetPixelAsm (J,I,Random(256));
Stop := Tick;
ShowAndTell;
end;
Procedure Init;
begin
Randomize;
end;
Begin
Init;
Control;
End.